<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="admin/_fragments :: head(~{::title})">
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <!-- Font Awesome CDN -->
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.13.0/css/all.css" integrity="sha384-Bfad6CLCknfcloXFOyFnlgtENryhrpZCe29RTifKEixXQZ38WheV+i/6YWSzkz3V" crossorigin="anonymous">
    <!-- Semantic CSS -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css" >
    <!-- Customize CSS -->
    <link rel="stylesheet" href="../../static/css/me.css" th:href="@{/css/me.css}">

    <title>shell845 | AdminLogin</title>
</head>

<body class="m-sticky-site">
<!-- Nav bar-->

<!-- Content -->
<div class="m-container-small m-padded-tb-large" style="max-width: 30em !important;">
    <div class="ui container">
        <div class="ui middle aligned center aligned grid">
            <div class="column">
                <h2 class="ui teal image header">
                    <div class="content">
                        Log-in as admin
                    </div>
                </h2>
                <form class="ui large form" method="post" action="#" th:action="@{/admin/login}">
                    <div class="ui segment">
                        <div class="field">
                            <div class="ui left icon input">
                                <i class="user icon"></i>
                                <input type="text" required="required" name="username" placeholder="Username">
                            </div>
                        </div>
                        <div class="field">
                            <div class="ui left icon input">
                                <i class="lock icon"></i>
                                <input type="password" required="required"  name="password" placeholder="Password">
                            </div>
                        </div>
                        <button class="ui fluid large teal submit button">Login</button>
                    </div>

                    <div class="ui error mini message"></div>
                    <div class="ui mini negative message" th:unless="${#strings.isEmpty(message)}" th:text="${message}">Invalid username or password</div>

                </form>

                <div class="ui message">
                    New to us? <a href="#"> Sign Up</a>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- Footer -->
<main class="m-sticky-site-content"></main>
<footer th:replace="admin/_fragments :: footer"></footer>
<!-- JavaScript -->
<th:block th:replace="_fragments :: script"></th:block>

</body>
</html>
